package model;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;


/**
 * The persistent class for the TASKS database table.
 * 
 */
@Entity
@Table(name="TASKS")
@NamedQueries({
	@NamedQuery( name="Task.findAll", query="SELECT t FROM Task t"), 
	@NamedQuery( name="Task.count", query="SELECT count(t) FROM Task t")
	})

public class Task implements Comparable<Object>, Serializable {
	
	private static final long serialVersionUID = 1L;
	
	private int id;
	private String code;
	private Date date;
	private String description;

	public Task() {
	}


	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}


	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}


	@Temporal(TemporalType.DATE)
	public Date getDate() {
		return this.date;
	}

	public void setDate(Date date) {
		this.date = date;
	}


	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}


	@Override
	public int compareTo(Object o) {
		
		return 1;
	}

}